package com.smart.community.feign.region.service;

import com.smart.community.feign.region.fallback.RegionStatisticsFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 区域统计Feign接口
 * 提供社区数量统计相关的远程调用接口
 * 
 * @author Wu.Liang
 * @version 1.0.0
 * @since 2025-01-30
 */
@FeignClient(name = "smart-community-region", 
             path = "/region", 
             fallbackFactory = RegionStatisticsFeignFallbackFactory.class,
             contextId = "regionStatisticsFeign")
public interface IRegionStatisticsFeign {
    
    /**
     * 根据物业公司ID列表统计社区数量
     * 
     * @param propertyCompanyIds 物业公司ID列表
     * @return 社区数量
     */
    @PostMapping("/feign/region/statistics/community-count/by-property-companies")
    Long countCommunitiesByPropertyCompanyIds(@RequestBody List<Long> propertyCompanyIds);
    
    /**
     * 根据社区ID列表获取社区信息
     * 
     * @param communityIds 社区ID列表
     * @return 社区数量
     */
    @PostMapping("/feign/region/statistics/community-count/by-ids")
    Long countCommunitiesByIds(@RequestBody List<Long> communityIds);
}
